= render 'fae/shared/index_header', title: @klass_humanized.pluralize, csv: true
main.content
  = fae_filter_form cookie_key: 'release-filter' do
    = fae_filter_select :wine
    = fae_filter_select :acclaims,
      label: 'Acclaim',
      collection: Acclaim.for_release_filter,
      label_method: :score,
      placeholder: 'Select some stuff'
    = fae_filter_select :test, options: [['one', 1], ['two', 2]]
    = fae_filter_select :grouped_test, grouped_options: { 'Numbers' => [['one', 1], ['two', 2]], 'Letters' => [['The letter J', 'J'], ['The letter N', 'N']] }
    = fae_filter_select :grouped_association, collection: Aroma.all, grouped_by: :release

  table
    thead
      tr
        th.-image
        th data-sort="name" Name
        th data-sort="wine.name_en" Wine
        th data-sort="slug" Slug
        th data-sort="price" Price
        th.-action-wide data-sort="updated_at" Modified
        th.-action-wide On Stage
        th.-action-wide On Prod
        th.-action
        th.-action

    tbody
      - if @items.present?
        - @items.each do |item|
          tr id="#{@klass_singular}_#{item.id}"
            td = fae_index_image item.bottle_shot, edit_admin_release_path(item)
            td = link_to item.fae_display_field, edit_admin_release_path(item)
            td = item.wine.name_en if item.wine.present?
            td = item.slug
            td = item.price
            td = fae_date_format item.updated_at
            td = fae_toggle item, :on_stage
            td = fae_toggle item, :on_prod
            td = fae_clone_button item
            td = fae_delete_button item
      - else
        tr: td colspan="9" No items found

  == paginate @items
